<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        function dely(duration,n){
            return new Promise((reslove)=>{
                setTimeout(()=>{
                    reslove(n);
                },duration)
            })
        }
        async function log(){
             const n1=await dely(2000,1);
             console.log(n1);
             const n2=await dely(2000,2);
             console.log(n1);
             const n3=await dely(2000,3);
             console.log(n3);
        }
    </script>
</body>
</html>